package coolapk.cj.demo.service.good.impl;

import coolapk.cj.demo.domain.Good;
import coolapk.cj.demo.mapper.GoodMapper;
import coolapk.cj.demo.service.good.GoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: demo
 * @description: 物品Service实现类
 * @author: SDH
 * @create: 2019-04-16 16:40
 **/
@Service("GoodService")
public class GoodServiceImpl implements GoodService {
	@Autowired
	GoodMapper goodMapper;

	@Override
	public int deleteByPrimaryKey(Integer id) {
		return goodMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Good record) {
		return goodMapper.insert(record);
	}

	@Override
	public int insertSelective(Good record) {
		return goodMapper.insertSelective(record);
	}

	@Override
	public Good selectByPrimaryKey(Integer id) {
		return goodMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(Good record) {
		return goodMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Good record) {
		return goodMapper.updateByPrimaryKey(record);
	}

	@Override
	public List<Good> getAllGoods() {
		return goodMapper.getAllGoods();
	}
}
